<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnProposerInNoteTable extends AbstractMigration
{
    public function up()
    {
        $this->table('note')
            ->addColumn('proposer', 'integer', ['signed' => false, 'null' => false, 'default' => 0, 'limit' => 11, 'comment' => '提出人'])
            ->addColumn('proposer_department', 'integer', ['signed' => false, 'null' => false, 'default' => 0, 'limit' => 11, 'comment' => '提出部门'])
            ->save();
    }

    public function down()
    {
        $this->table('note')
            ->removeColumn('proposer')
            ->removeColumn('proposer_department')
            ->save();
    }
}
